// @ts-ignore
/* eslint-disable */
import request from "@/plugins/globalRequest";


/** 获取当前登录者的信息 GET /backStage/admin/logout */
export async function getCurrentUserInfo(options?: { [key: string]: any }) {
  return request<API.currentUser>('/admin/getCurrentUserInfo', {
    method: 'GET',
    ...(options || {}),
  });
}


/** 更新管理员角色信息 POST /admin/assignRoleToAdmin */
export async function updateAdminRoleInfoUsingPOST(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.updateAdminRoleInfoUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResult>('/admin/assignRoleToAdmin', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 新增管理员,角色只需要RoleID POST /admin/insertAdminInfo */
export async function insertAdminInfoUsingPOST(body: API.Admin, options?: { [key: string]: any }) {
  return request<API.BaseResult>('/admin/insertAdminInfo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 条件分页查询管理员 GET /admin/pageQueryAdmin */
export async function pageQueryAdminUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  body: API.pageQueryAdminUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResultPageQueryCondition_>('/admin/pageQueryAdmin', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 根据id查询管理员 GET /admin/queryAdmin/${param0} */
export async function queryAdminByIdUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.queryAdminByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResultAdmin_>(`/admin/queryAdmin/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 更新管理员信息 PUT /admin/updateAdmin */
export async function updateAdminInfoUsingPUT(body: API.Admin, options?: { [key: string]: any }) {
  return request<API.BaseResult>('/admin/updateAdmin', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 更改管理员状态 DELETE /admin/updateAdminStatus/${param0} */
export async function updateAdminStatusUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.updateAdminStatusUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResult>(`/admin/updateAdminStatus/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}
